package com.qianfeng.smartdevices.pojo;

public class Category implements CheckNull {
    private Long id;
    private String categoryname;
    private String txcommand;
    private String rxcommand;
    private String status;
    private String commandname;// 主要目的是在页面上显示 txcommand  对应的名字

    public String getCommandname() {
        return commandname;
    }

    public void setCommandname(String commandname) {
        this.commandname = commandname;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCategoryname() {
        return categoryname;
    }

    public void setCategoryname(String categoryname) {
        this.categoryname = categoryname;
    }

    public String getTxcommand() {
        return txcommand;
    }

    public void setTxcommand(String txcommand) {
        this.txcommand = txcommand;
    }

    public String getRxcommand() {
        return rxcommand;
    }

    public void setRxcommand(String rxcommand) {
        this.rxcommand = rxcommand;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    /**
     * 主要用于在对集合中的数据进行移除替换的时候使用
     *
     * @param o
     * @return
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Category category = (Category) o;
        return id.equals(category.id);
    }


    @Override
    public boolean isNull(CheckStatus status) {
        return categoryname == null && this.status == null;
    }
}
